// SPDX-License-Identifier: GPL-2.0
/******************************************************************************
 *    NAND Flash Controller nand Device Driver
 *    Copyright (c) 2009-2010 by Hisilicon.
 * ***
 *
 ******************************************************************************/
#ifndef HINAND_H
#define HINAND_H
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <asm/setup.h>

#define CONFIG_NAND_MAX_CHIP                    (1)
extern char g_flash_cmd_line[];
extern unsigned long g_default_oob_size;
extern struct hinfc_ewe_count g_nand_ewetimes;

#ifndef __setup_param
#define __setup_param(str, unique_id, fn, early) \
	static const char __setup_str_##unique_id[] __initconst \
		__aligned(1) = str; \
	static struct obs_kernel_param __setup_##unique_id \
		__used __section(".init.setup") \
		__aligned(sizeof(long)) \
		= { __setup_str_##unique_id, fn, early }
#endif

#ifndef __setup
#define __setup(str, fn) \
	__setup_param(str, fn, fn, 0)
#endif

extern char __initdata save_cmd_line[COMMAND_LINE_SIZE];
extern void nand_spl_ids_init(void);
#endif
